package web_view

import (
	"time"

	"gorm.io/gorm"
)

const TableNameOrderHeaderReport = "order_header_report"

// OrderHeaderReport mapped from table <order_header_report>
type OrderHeaderReport struct {
	ID            int64          `gorm:"column:id;type:INTEGER" json:"id"`
	OrderCode     string         `gorm:"column:order_code;type:TEXT" json:"order_code"`
	CustomerCode  string         `gorm:"column:customer_code;type:TEXT" json:"customer_code"`
	TrusteeName   string         `gorm:"column:trustee_name;type:TEXT" json:"trustee_name"`
	CustomerName  string         `gorm:"column:customer_name;type:TEXT" json:"customer_name"`
	Route         string         `gorm:"column:route;type:TEXT" json:"route"`
	PriorityLevel string         `gorm:"column:priority_level;type:TEXT" json:"priority_level"`
	PackCount     int64          `gorm:"column:pack_count;type:INTEGER" json:"pack_count"`
	TransBillID   int64          `gorm:"column:trans_bill_id;type:INTEGER" json:"trans_bill_id"`
	TransBillSn   string         `gorm:"column:trans_bill_sn;type:TEXT" json:"trans_bill_sn"`
	Status        string         `gorm:"column:status;type:TEXT" json:"status"`
	OrderType     string         `gorm:"column:order_type;type:TEXT" json:"order_type"`
	CreatedAt     time.Time      `gorm:"column:created_at;type:DATETIME" json:"created_at"`
	UpdatedAt     time.Time      `gorm:"column:updated_at;type:DATETIME" json:"updated_at"`
	DeletedAt     gorm.DeletedAt `gorm:"column:deleted_at;type:DATETIME" json:"deleted_at"`
	CreatedBy     string         `gorm:"column:created_by;type:TEXT" json:"created_by"`
	UpdatedBy     string         `gorm:"column:updated_by;type:TEXT" json:"updated_by"`
	CarSn         string         `gorm:"column:car_sn;type:TEXT" json:"car_sn"`
	CarrierName   string         `gorm:"column:carrier_name;type:TEXT" json:"carrier_name"`
	DriverName    string         `gorm:"column:driver_name;type:TEXT" json:"driver_name"`
}

// TableName OrderHeaderReport's table name
func (*OrderHeaderReport) TableName() string {
	return TableNameOrderHeaderReport
}
